package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
* Created by Mybatis Generator on 2023/12/26
*/
@Data
@ApiModel("问诊开药记录")
@Table(name = "tbl_booking_prescription")
@NoArgsConstructor
@AllArgsConstructor
public class TblBookingPrescription extends BaseEntity {
    @Column(name = "booking_id")
    private String bookingId;

    @Column(name = "product_id")
    private String productId;

    /**
     * 购买数量
     */
    @ApiModelProperty("购买数量")
    private Integer quantity;



    @ApiModelProperty("病人购买单价")
    @Column(name = "selling_price_per_unit")
    private BigDecimal sellingPricePerUnit;


    @ApiModelProperty("quantity*selling_price_per_unit")
    @Column(name = "selling_price_total")
    private BigDecimal sellingPriceTotal;

    private Integer show;

    private Integer cancel;

    private String frequency;

    @Column(name = "causes_drowsiness")
    private Integer causesDrowsiness;

    /**
     * 1day 2week 3month 4year
     */
    @Column(name = "duration_unit")
    @ApiModelProperty("1day 2week 3month 4year")
    private Integer durationUnit;

    private Integer duration;

    @Column(name = "pharmacy_id")
    private String pharmacyId;

    /**
     * 取值为对应product中cdmp的值
     */
    @ApiModelProperty("取值为对应product中cdmp的值")
    private Integer chronic;

    /**
     * 保留 存1
     */
    @Column(name = "pharmacy_is_collected")
    @ApiModelProperty("保留 存1")
    private Integer pharmacyIsCollected;

    @ApiModelProperty("医生开药每次服用数量")
    @Column(name = "uom_quantity")
    private Integer uomQuantity;

    private Integer prn;

    /**
     * 最小用药UOM_ID
     */
    @Column(name = "prescription_unit")
    @ApiModelProperty("最小用药UOM_ID")
    private String prescriptionUnit;

//    /**
//     * 0未选择 1selected 2paid 3deliver
//     */
//    @ApiModelProperty("0未选择 1selected 2paid 3deliver")
//    private Integer status;

//    /**
//     * Cms操作是否确认
//     */
//    @ApiModelProperty("Cms操作是否确认")
//    private Integer verified;

//    /**
//     * Cms做了pack之后通知医生(notify checker)，医生操作确认后记录医生的id
//     */
//    @Column(name = "doctor_verify")
//    @ApiModelProperty("Cms做了pack之后通知医生(notify checker)，医生操作确认后记录医生的id")
//    private String doctorVerify;
//
//    /**
//     * 医生verify的时间
//     */
//    @Column(name = "verified_on")
//    @ApiModelProperty("医生verify的时间")
//    private Date verifiedOn;

//    /**
//     * 复购的booking_id
//     */
//    @Column(name = "booking_addition_id")
//    @ApiModelProperty("复购的booking_id")
//    private String bookingAdditionId;

    @Column(name = "in_exclusion_list")
    private Integer inExclusionList;

//    /**
//     * CMS操作fullfill总数量
//     */
//    @Column(name = "quantity_fulfilled")
//    @ApiModelProperty("CMS操作fulfill总数量")
//    private Integer quantityFulfilled;
//
//    /**
//     * CMS fullfill时选择的pharmacy Id
//     */
//    @Column(name = "dispensed_by")
//    @ApiModelProperty("CMS fullfill时选择的pharmacy Id")
//    private String dispensedBy;
//
//    /**
//     * 最后一次fullfill时间
//     */
//    @Column(name = "time_update_fulfilling")
//    @ApiModelProperty("最后一次fullfill时间")
//    private Date timeUpdateFulfilling;

    @Column(name = "package_flag")
    private Integer packageFlag;

    @Column(name = "package_id")
    private String packageId;

    @Column(name = "step_dose")
    private String stepDose;

    @Column(name = "take_complete_course")
    private Integer takeCompleteCourse;

    private String remark;

    @Column(name = "third_party_product_id")
    private String thirdPartyProductId;

    @Column(name = "third_party_product_name")
    private String thirdPartyProductName;

    @Column(name = "third_party_product_price")
    private BigDecimal thirdPartyProductPrice;

    /**
     * todo
     */
    @ApiModelProperty("todo")
    private Integer original;

    /**
     * 第一次结算时是否被选中
     */
    @ApiModelProperty("第一次结算时是否被选中")
    private Integer selected;

    @Column(name = "index_order")
    private Integer indexOrder;

    /**
     * 是否为controlled的药品
     */
    @ApiModelProperty("是否为controlled的药品")
    private Integer controlled;

    /**
     * 是否在排除的列表并且covered
     */
    @Column(name = "covered_diagnosis")
    @ApiModelProperty("是否在排除的列表并且covered")
    private Integer coveredDiagnosis;

    @Column(name = "covered_diagnosis_regex")
    private String coveredDiagnosisRegex;

    /**
     * Todo 如何设置
     */
    @Column(name = "show_price_on_app")
    @ApiModelProperty("Todo 如何设置")
    private Integer showPriceOnApp;

    /**
     * 医生设置
     */
    @Column(name = "remind_patient_to_call_back")
    @ApiModelProperty("医生设置")
    private Integer remindPatientToCallBack;

    @Column(name = "what_is_for")
    private String whatIsFor;

    @Column(name = "any_precautions")
    private String anyPrecautions;

    @Column(name = "prn_reason")
    private String prnReason;

    @Column(name = "covered_diagnosis_code")
    private String coveredDiagnosisCode;

    @Column(name = "patient_instruction")
    private String patientInstruction;

    @Column(name = "pharmacist_instruction")
    private String pharmacistInstruction;

    @Column(name = "medication_instruction")
    private String medicationInstruction;


    @ApiModelProperty("印尼医生approve新加坡医生给印尼病人开的药，此处记录在医生端做这个操作的医生id")
    @Column(name = "medication_approved_by")
    private String medicationApprovedBy;


    @ApiModelProperty("Approve 的时间")
    @Column(name = "medication_approved_at")
    private Date medicationApprovedAt;


}